#ifndef __COMMAND__
#define __COMMAND__

#include "global.h"

#define MAX_ARGS    10
#define CMD_LEN     30
#define LONGCMD_LEN 80

uint16 _atoi(char *buf) ;
bool parse_and_run(char *line);
void List(uint8 argc, uint8 *argv[]);
void Test(uint8 argc, uint8 *argv[]);
void SetReg(uint8 argc, uint8 *argv[]);
void Receive(uint8 argc, uint8 *argv[]);
void Transmit(uint8 argc, uint8 *argv[]);
void SpiReset(uint8 argc, uint8 *argv[]);
void ShutDown(uint8 argc, uint8 *argv[]);
void Standby(uint8 argc, uint8 *argv[]);
void CalTx(uint8 argc, uint8 *argv[]);
void CalRx(uint8 argc, uint8 *argv[]);
void SetFrequency(uint8 argc, uint8 *argv[]);
void SetRxGain(uint8 argc, uint8 *argv[]);
void SetTxGain(uint8 argc, uint8 *argv[]);
void TestTransmit(uint8 argc, uint8 *argv[]);
void TestReceive(uint8 argc, uint8 *argv[]);
void EnableSW1(uint8 argc, uint8 *argv[]);
void DisableSW1(uint8 argc, uint8 *argv[]);
void DisableSW2(uint8 argc, uint8 *argv[]);
void EnableSW2(uint8 argc, uint8 *argv[]);


typedef void (*process)(uint8 argc, char *argv[]);
typedef struct cmd_type{
    char cmd[CMD_LEN];
	char longcmd[LONGCMD_LEN];
	process proc;
}cmd_type;

#endif